<template>
  <div>
    <van-search v-model="value" :background="datas.backgroundColor" :shape="datas.shape"
                @clear="onClear"
                @search="onSearch"
                placeholder="请输入搜索关键词"/>

  </div>
</template>

<script>

export default {
  name: 'commoditysearch',
  props: {
    datas: Object,
  },
  data() {
    return {
      value: ""
    }
  },
  methods:{
    onClear(){
      console.info("清除：" + this.value);
      this.value = ""
    },
    onSearch() {
      console.info('搜索' + this.value);
    },
  }
}
</script>

<style scoped lang="less">

</style>
